<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	template="/WEB-INF/templates/default.xhtml">
	<ui:define name="sidebar">
	</ui:define>
	<ui:define name="content">
		<h:form>
			<p:panelGrid columns="3" rendered="#{!login.loggedIn}" styleClass="panelGridCenter" columnClasses="firstColumn, firstColumn, secondColumn">
				<f:facet name="header">Login</f:facet>
				<f:validateBean>
					<h:outputLabel for="username">Username:</h:outputLabel>
					<h:inputText id="username" value="#{credentials.username}" required="true" label ="Username"/>
					 <p:message for="username" display="icon"/>
					<h:outputLabel for="password">Password:</h:outputLabel>
					<h:inputSecret id="password" value="#{credentials.password}" required="true" label="Password"/>
					 <p:message for="password" display="icon"/>
				</f:validateBean>
				<f:facet name="footer">
						<h:commandButton value="Login" action="#{login.loginAction}" rendered="#{!login.loggedIn}" />
			</f:facet>
			</p:panelGrid>
			<p:messages id="messages" showDetail="false" autoUpdate="true" closable="true" />
		</h:form>
	</ui:define>
</ui:composition>
